﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bookvar.ServiceModel
{
    /// <summary>
    /// This service provides a consistent way to show errors to the user.
    /// </summary>
    public interface IErrorService
    {
        /// <summary>
        /// Shows an error to the user.  
        /// </summary>
        /// Use this when the error is not caused by a mistake in
        /// the application code, but it is caused by the user or his environment. For example
        /// an error is the lack of Internet connection or the user entering a wrong password.
        /// <param name="message">The message.</param>
        void ShowError( string message );

        /// <summary>
        /// Shows a warning to the user.
        /// </summary>
        /// <param name="message">The message.</param>
        void ShowWarning( string message );

        /// <summary>
        /// Shows an error caused by the application to the user.
        /// </summary>
        /// Use this when there is a an exception caused by our (developers') code. This method
        /// shows an Resharper like error reporting window where you can add details to the error
        /// and submit it to us to investigate.
        /// <param name="message">The error message.</param>
        void ShowApplicationError( string message );

        /// <summary>
        /// Shows an error caused by the application to the user.
        /// </summary>
        /// Use this when there is a an exception caused by our (developers') code. This method
        /// shows an Resharper like error reporting window where you can add details to the error
        /// and submit it to us to investigate.
        /// <param name="exception">The exception that caused the application error.</param>
        void ShowApplicationError( Exception exception );
    }
}
